#include <stdio.h>
int main()
{int n,m;
int i=1;
double t=0.0;
double sum=0.0;
double h=0.0;
scanf("%d %d",&n,&m);

    if(m=1)
    {
sum=1.0*n;
h=1.0/4*n;
printf("%.2f\n",sum);
printf("%.2f\n",h) ;
    }
  else
    {sum=n;h=n;
        for(i=1;i<=m;i++)
    {h/=1.0/4*n;

    sum+=2*t;
    }
printf("%.2f\n",sum);
printf("%.2f\n",h) ; }

    return 0;
}
